<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<base href="<%=basePath%>">

		<title>商务通生成页!!!</title>
		<script type="text/javascript">
			function clickd(cs){
				//var gs = document.getElementById("bmgs").value;
				document.getElementById("jsdm").value = "<script type='text/javascript' src='http://192.168.1.119:8080/Produces/swt/swt.jsp' charset='"+cs+"'><\/script>";
			}
		</script>
	</head>

	<body>
		<h2 align="center">
			商務通生成頁面
		</h2>
		<br>
		<hr>
		<c:if test="${!empty msg}">
			<script>
				alert("${msg}");
			</script>
		</c:if>
		<a href="NdSwt.jsp">添加</a>
		<a href="index.jsp">首頁</a>
		&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;統一js代碼:
		<input id="jsdm" type="text"
			value="<script type='text/javascript' src='http://192.168.1.119:8080/Produces/swt/swt.jsp'></script>" size="150">
		<table width="100%" border="1">
			<tr>
				<td align="center">
					网&nbsp;站&nbsp;名&nbsp;称&nbsp;
				</td>
				<td align="center">
					网&nbsp;站&nbsp;网&nbsp;址&nbsp;
				</td>
				<td align="center">
					商務通代碼
				</td>
				<td align="center">
					编 码 格 式
				</td>
				<td align="center">
					操&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;作
				</td>
			</tr>
			<c:if test="${empty info}">
				<script>
					location = "GetInfomessage";
				</script>
			</c:if>
			<c:if test="${!empty info}">
				<c:forEach items="${list}" var="l">
					<tr>
						<td>
							<input type="text" value="${l.pathname }" size="40">
						</td>
						<td>
							<input type="text" value="${l.webname }" size="40">
						</td>
						<td>
							<input type="text" value="${l.swtjs }" size="40">
						</td>
						<td>
							<input id="bmgs" type="text" value="${l.bmgs }" size="40">
						</td>
						<td>
							<a href="GetOne?id=${l.id }">修改</a>
							<a href="DeleInfomessage?id=${l.id }">刪除</a>
							<input type="button" value="使用" onclick="clickd('${l.bmgs }')">
						</td>
					</tr>
				</c:forEach>
			</c:if>

		</table>
	</body>
</html>
